package cn.event;


import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {

    public static void main(String args[]){
        AnnotationConfigApplicationContext eventContext = new AnnotationConfigApplicationContext(EventConfig.class);
        EventPublisher publisher = eventContext.getBean(EventPublisher.class);
        publisher.publish("我是Publisher发布的信息" );
        eventContext.close();

    }
}
